/*
 * @Author: xiehangyun 
 * @Date: 2025-05-16 10:49:46 
 * @Last Modified by: xiehangyun
 * @Last Modified time: 2025-05-16 10:52:51
 */

import Api from "src/api/Api";

// 订单完成的接口
class OrderCompleteApi extends Api {
    constructor() {
        super();
    }

    // 获取订单详情
    getOrderDetail(orderId: string) {
        return this._get(`/order/detail?id=${orderId}`);
    }

    // 评价订单
    rateOrder(orderId: string, rating: number, comment?: string) {
        return this._post("/order/rate", { 
            data: { orderId, rating, comment } 
        });
    }
}

const orderCompleteApi = new OrderCompleteApi();

export default orderCompleteApi;